var rootUrl = "http://angularjs.cn";
var apiUrl = rootUrl + "/api";
var articleApiUrl = apiUrl + "/article";
var userApiUrl = apiUrl + "/user";

function saplife_param(name, url) {
	if(!url) {
		//url = document.location;//window.location.href;
		var loc = String(document.location);
	    if (loc.indexOf("?") > 0) 
	        loc = loc.substr(loc.indexOf('?') + 1);
	    else 
	        loc = uexWindow.getUrlQuery();
	}
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexText = "[\\?&]" + name + "=([^&#]*)";
	var regex = new RegExp(regexText);
	var results = regex.exec(url);
	return (!results) ? null : results[1];
}